<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class InsertRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'=>'required|max:32',
			'password'=>'required',
			'email'=>'required',
			//'photo'=>'required'
        ]
    }
	
	public function messages()
	{
		return[
		'name.required'=>'用户名不能为空',
		'name.max'=>'请输入32个以内的字符',
		'name.email'=>'邮箱不能为空'
		]
	}
}
